/*
 * @Descripttion:
 * @version: 1.0.0
 * @Author: htang
 * @Date: 2024-03-02 14:06:57
 * @LastEditors: htang
 * @LastEditTime: 2024-03-03 15:47:32
 */
import { defHttp } from '/@/utils/http/axios';
import { createVNode } from 'vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { Modal, message } from 'ant-design-vue';

const API = {
  // 站点报警占比
  alarmStation: '/data-statistics/alarm-station-statistics',
  // 告警状态占比
  alarmStaus: '/data-statistics/alarm-status-statistics',
  // 报警数量趋势
  alarmTrend: '/data-statistics/alarm-trend-statistics',
  // 工单数据统计
  orderStatus: '/data-statistics/order-status-statistics',
  // 工单类型数据统计(饼图)
  orderType: '/data-statistics/order-type-statistics',
  // 访客统计
  visitStatistics: '/data-statistics/visit-statistics',
  // 今日报警类型数量
  dayAlarmTyhpeCount: '/data-statistics/day-alarm-type-count',
  // 工单占比
  orderStatusCount: '/data-statistics/order-status-count',
  //
  summaryType: '/equipment-alarm/summary-type',
  // 设备类型告警统计
  summaryEquipmentType: '/equipment-alarm/summary-equipment-type'
}

/**
 * 站点报警占比
 * @returns
 */
export const alarmStationApi = async (params) => {
  return await defHttp.get({ url: API.alarmStation, params });
};

/**
 * 告警状态占比
 * @returns
 */
export const alarmStausApi = async (params) => {
  return await defHttp.get({ url: API.alarmStaus, params });
};

/**
 * 报警数量趋势
 * @returns
 */
export const alarmTrendApi = async (params) => {
  return await defHttp.get({ url: API.alarmTrend, params });
};

/**
 * 工单数据统计
 * @returns
 */
export const orderStatusApi = async (params) => {
  return await defHttp.get({ url: API.orderStatus, params });
};

/**
 * 工单数据统计
 * @returns
 */
export const orderTypeApi = async (params) => {
  return await defHttp.get({ url: API.orderType, params });
};

/**
 * 访客统计
 * @returns
 */
export const visitStatisticsApi = async (params) => {
  return await defHttp.get({ url: API.visitStatistics, params });
};

/**
 * 今日报警类型数量
 * @returns
 */
export const dayAlarmTyhpeCountApi = async (params) => {
  return await defHttp.get({ url: API.dayAlarmTyhpeCount, params });
};

/**
 * 报警统计-类型
 * @returns
 */
export const orderStatusCountApi = async (params) => {
  return await defHttp.get({ url: API.orderStatusCount, params });
};

/**
 * 报警统计-类型
 * @returns
 */
export const summaryTypeApi = async () => {
  return await defHttp.post({ url: API.summaryType });
};

/**
 * 设备类型告警统计
 * @returns
 */
export const summaryEquipmentTypeApi = async () => {
  return await defHttp.post({ url: API.summaryEquipmentType });
};